﻿using System;

/**
*@file       common.cs
*@brief      common definition of net libray
*
*@author     graywind
*@version    1.0.0.0
*@data       2012/01/07
*/

/// <summary>
/// common definitiion
/// </summary>
public class NetCommon
{
    /// <summary>
    /// operate types
    /// </summary>
    public class OperateType
    {

    }

    public class OperateListen : OperateType
    {
        public const int TypeValue  = 0;
    }

    public class OperateConnect : OperateType
    {
        public const int TypeValue = 1;
    }

    public class OperateKick : OperateType
    {
        public const int TypeValue = 2;
    }

    public class OperateDisconnect : OperateType
    {
        public const int TypeValue = 3;
    }

    public class OperateSend : OperateType
    {
        public const int TypeValue = 4;
    }

    public class OperateRead : OperateType
    {
        public const int TypeValue = 5;
    }

    /// <summary>
    /// callback function
    /// </summary>
    /// <param name="session_id"></param>
    /// <param name="pMsgBuffer"></param>
    /// <param name="msgID"></param>
    /// <param name="msg_bytes"></param>
    /// <param name="type"></param>
    /// <param name="error_code"></param>
    public delegate void MsgProc(Int32 session_id, IntPtr pMsgBuffer, UInt32 msgID, UInt32 msg_bytes, Int32 type, int error_code);
}
